package thread;

public class Demo16 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            while (true){
                //这里啥也不写
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
        });
        System.out.println(t.getState());
        t.start();

        //由于线程是持续 while 循环，因此 join不会

        Thread.sleep(500);
        System.out.println(t.getState());
    }
}
